package org.light.generator;

import java.util.ArrayList;
import java.util.List;

import org.light.core.Writeable;
import org.light.domain.Domain;
import org.light.domain.Statement;
import org.light.domain.StatementList;
import org.light.utils.WriteableUtil;

public class GoModGenerator extends Generator{
	protected Domain sampleDomain;
	
	public GoModGenerator(Domain sampleDomain){
		super();
		super.fileName = "go.mod";
		super.standardName = "GoMod";
		this.sampleDomain = sampleDomain;
	}

	@Override
	public StatementList generateStatementList() {
		List<Writeable> sList = new ArrayList<Writeable>();
		sList.add(new Statement(1000L,0,"module "+this.sampleDomain.getProjectName()));
		sList.add(new Statement(2000L,0,""));
		sList.add(new Statement(3000L,0,"go 1.22.3"));
		sList.add(new Statement(4000L,0,""));
		sList.add(new Statement(5000L,0,"require ("));
		sList.add(new Statement(6000L,1,"github.com/gorilla/sessions v1.3.0"));
		sList.add(new Statement(7000L,0,")"));
		return WriteableUtil.merge(sList);
	}

	public Domain getSampleDomain() {
		return sampleDomain;
	}

	public void setSampleDomain(Domain sampleDomain) {
		this.sampleDomain = sampleDomain;
	}

}
